package java_1_23;

import com.sun.xml.internal.ws.api.model.wsdl.WSDLOutput;

/**
 * 方法内部类
 */
public class Outter2 {
    private int age=9;
    public void fun(int num){
        //方法内部类，出了这个方法就没了，不能出现任何访问修饰符和static
        class Inner{
            public void test(){
                System.out.println(age);
                //num++;
                System.out.println(num);
            }
        }
       // num++;
        System.out.println(num);
    }

    public static void main(String[] args) {
        Outter2 outter2=new Outter2();
        outter2.fun(10);

    }
}
